package xushuo.dao.service.token;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xushuo.dao.entity.token.AccessTokenDao;
import xushuo.dao.entity.weixin.token.AccessToken;

/**
 * Create by zhangpe0312@qq.com on 2018/2/5.
 */
@Transactional
@Service
public class AccessTokenService {

    @Autowired
    AccessTokenDao accessTokenDao;

    public void addAccessToken(AccessToken token){
        accessTokenDao.addAccessToken(token);
    }

    public AccessToken getAccessToken(){
       return accessTokenDao.getAccessToken();
    }

    public void deleteAccessToken(AccessToken token){
        accessTokenDao.deleteAccessToken(token);
    }
}
